home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsITimerManager.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  3.9 KB  |  131 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsITimerManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsITimerManager_h__
  6. #define __gen_nsITimerManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsITimerManager */
  19. #define NS_ITIMERMANAGER_IID_STR "8fce8c6a-1dd2-11b2-8352-8cdd2b965efc"
  20.  
  21. #define NS_ITIMERMANAGER_IID \
  22.   {0x8fce8c6a, 0x1dd2, 0x11b2, \
  23.     { 0x83, 0x52, 0x8c, 0xdd, 0x2b, 0x96, 0x5e, 0xfc }}
  24.  
  25. class NS_NO_VTABLE nsITimerManager : public nsISupports {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMERMANAGER_IID)
  29.  
  30.   /**
  31.    * A flag that turns on the use of idle timers on the main thread.
  32.    * this should only be called once.
  33.    *
  34.    * By default, idle timers are off.
  35.    *
  36.    * One this is set to TRUE, you are expected to call hasIdleTimers/fireNextIdleTimer
  37.    * when you have time in your main loop.
  38.    */
  39.   /* attribute boolean useIdleTimers; */
  40.   NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers) = 0;
  41.   NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers) = 0;
  42.  
  43.   /* boolean hasIdleTimers (); */
  44.   NS_IMETHOD HasIdleTimers(PRBool *_retval) = 0;
  45.  
  46.   /* void fireNextIdleTimer (); */
  47.   NS_IMETHOD FireNextIdleTimer(void) = 0;
  48.  
  49. };
  50.  
  51. /* Use this macro when declaring classes that implement this interface. */
  52. #define NS_DECL_NSITIMERMANAGER \
  53.   NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers); \
  54.   NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers); \
  55.   NS_IMETHOD HasIdleTimers(PRBool *_retval); \
  56.   NS_IMETHOD FireNextIdleTimer(void); 
  57.  
  58. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  59. #define NS_FORWARD_NSITIMERMANAGER(_to) \
  60.   NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers) { return _to GetUseIdleTimers(aUseIdleTimers); } \
  61.   NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers) { return _to SetUseIdleTimers(aUseIdleTimers); } \
  62.   NS_IMETHOD HasIdleTimers(PRBool *_retval) { return _to HasIdleTimers(_retval); } \
  63.   NS_IMETHOD FireNextIdleTimer(void) { return _to FireNextIdleTimer(); } 
  64.  
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  66. #define NS_FORWARD_SAFE_NSITIMERMANAGER(_to) \
  67.   NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseIdleTimers(aUseIdleTimers); } \
  68.   NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseIdleTimers(aUseIdleTimers); } \
  69.   NS_IMETHOD HasIdleTimers(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasIdleTimers(_retval); } \
  70.   NS_IMETHOD FireNextIdleTimer(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FireNextIdleTimer(); } 
  71.  
  72. #if 0
  73. /* Use the code below as a template for the implementation class for this interface. */
  74.  
  75. /* Header file */
  76. class nsTimerManager : public nsITimerManager
  77. {
  78. public:
  79.   NS_DECL_ISUPPORTS
  80.   NS_DECL_NSITIMERMANAGER
  81.  
  82.   nsTimerManager();
  83.  
  84. private:
  85.   ~nsTimerManager();
  86.  
  87. protected:
  88.   /* additional members */
  89. };
  90.  
  91. /* Implementation file */
  92. NS_IMPL_ISUPPORTS1(nsTimerManager, nsITimerManager)
  93.  
  94. nsTimerManager::nsTimerManager()
  95. {
  96.   /* member initializers and constructor code */
  97. }
  98.  
  99. nsTimerManager::~nsTimerManager()
  100. {
  101.   /* destructor code */
  102. }
  103.  
  104. /* attribute boolean useIdleTimers; */
  105. NS_IMETHODIMP nsTimerManager::GetUseIdleTimers(PRBool *aUseIdleTimers)
  106. {
  107.     return NS_ERROR_NOT_IMPLEMENTED;
  108. }
  109. NS_IMETHODIMP nsTimerManager::SetUseIdleTimers(PRBool aUseIdleTimers)
  110. {
  111.     return NS_ERROR_NOT_IMPLEMENTED;
  112. }
  113.  
  114. /* boolean hasIdleTimers (); */
  115. NS_IMETHODIMP nsTimerManager::HasIdleTimers(PRBool *_retval)
  116. {
  117.     return NS_ERROR_NOT_IMPLEMENTED;
  118. }
  119.  
  120. /* void fireNextIdleTimer (); */
  121. NS_IMETHODIMP nsTimerManager::FireNextIdleTimer()
  122. {
  123.     return NS_ERROR_NOT_IMPLEMENTED;
  124. }
  125.  
  126. /* End of implementation class template. */
  127. #endif
  128.  
  129.  
  130. #endif /* __gen_nsITimerManager_h__ */
  131.